<!DOCTYPE html>
<html lang="en-us">
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    
<meta charset="UTF-8">
<title>Backing Up Your Cluster | Elasticsearch: The Definitive Guide [2.x] | Elastic</title>
<link rel="home" href="index.html" title="Elasticsearch: The Definitive Guide [2.x]">
<link rel="up" href="post_deploy.html" title="Post-Deployment">
<link rel="prev" href="_rolling_restarts.html" title="Rolling Restarts">
<link rel="next" href="_restoring_from_a_snapshot.html" title="Restoring from a Snapshot">
<meta name="DC.type" content="Learn/Docs/Legacy/Elasticsearch/Definitive Guide/2.x">
<meta name="DC.subject" content="Elasticsearch">
<meta name="DC.identifier" content="2.x">
<meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://cdn.optimizely.com/js/18132920325.js"></script>
    <link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
    <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
    <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
    <link rel="manifest" href="/manifest.json">
    <meta name="apple-mobile-web-app-title" content="Elastic">
    <meta name="application-name" content="Elastic">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="/mstile-144x144.png">
    <meta name="theme-color" content="#ffffff">
    <meta name="naver-site-verification" content="936882c1853b701b3cef3721758d80535413dbfd">
    <meta name="yandex-verification" content="d8a47e95d0972434">
    <meta name="localized" content="true">
    <meta name="st:robots" content="follow,index">
    <meta property="og:image" content="https://www.elastic.co/static/images/elastic-logo-200.png">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link rel="apple-touch-icon-precomposed" sizes="64x64" href="/favicon_64x64_16bit.png">
    <link rel="apple-touch-icon-precomposed" sizes="32x32" href="/favicon_32x32.png">
    <link rel="apple-touch-icon-precomposed" sizes="16x16" href="/favicon_16x16.png">
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/guide/static/styles.css">
  </head>

  <!--© 2015-2021 Elasticsearch B.V. Copying, publishing and/or distributing without written permission is strictly prohibited.-->

  <body>
    <!-- Google Tag Manager -->
    <script>dataLayer = [];</script><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-58RLH5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-58RLH5');</script>
    <!-- End Google Tag Manager -->

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-12395217-16"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-12395217-16');
    </script>

    <!--BEGIN QUALTRICS WEBSITE FEEDBACK SNIPPET-->
    <script type="text/javascript">
      (function(){var g=function(e,h,f,g){
      this.get=function(a){for(var a=a+"=",c=document.cookie.split(";"),b=0,e=c.length;b<e;b++){for(var d=c[b];" "==d.charAt(0);)d=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length)}return null};
      this.set=function(a,c){var b="",b=new Date;b.setTime(b.getTime()+6048E5);b="; expires="+b.toGMTString();document.cookie=a+"="+c+b+"; path=/; "};
      this.check=function(){var a=this.get(f);if(a)a=a.split(":");else if(100!=e)"v"==h&&(e=Math.random()>=e/100?0:100),a=[h,e,0],this.set(f,a.join(":"));else return!0;var c=a[1];if(100==c)return!0;switch(a[0]){case "v":return!1;case "r":return c=a[2]%Math.floor(100/c),a[2]++,this.set(f,a.join(":")),!c}return!0};
      this.go=function(){if(this.check()){var a=document.createElement("script");a.type="text/javascript";a.src=g;document.body&&document.body.appendChild(a)}};
      this.start=function(){var a=this;window.addEventListener?window.addEventListener("load",function(){a.go()},!1):window.attachEvent&&window.attachEvent("onload",function(){a.go()})}};
      try{(new g(100,"r","QSI_S_ZN_emkP0oSe9Qrn7kF","https://znemkp0ose9qrn7kf-elastic.siteintercept.qualtrics.com/WRSiteInterceptEngine/?Q_ZID=ZN_emkP0oSe9Qrn7kF")).start()}catch(i){}})();
    </script><div id="ZN_emkP0oSe9Qrn7kF"><!--DO NOT REMOVE-CONTENTS PLACED HERE--></div>
    <!--END WEBSITE FEEDBACK SNIPPET-->

    <div id="elastic-nav" style="display:none;"></div>
    <script src="https://www.elastic.co/elastic-nav.js"></script>

    <!-- Subnav -->
    <div>
      <div>
        <div class="tertiary-nav d-none d-md-block">
          <div class="container">
            <div class="p-t-b-15 d-flex justify-content-between nav-container">
              <div class="breadcrum-wrapper"><span><a href="/guide/" style="font-size: 14px; font-weight: 600; color: #000;">Docs</a></span></div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="main-container">
      <section id="content">
        <div class="content-wrapper">

          <section id="guide" lang="en">
            <div class="container">
              <div class="row">
                <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                  <!-- start body -->
                  <div class="page_header">
<p>
  <strong>WARNING</strong>: The 2.x versions of Elasticsearch have passed their
  <a href="https://www.elastic.co/support/eol">EOL dates</a>. If you are running
  a 2.x version, we strongly advise you to upgrade.
</p>
<p>
  This documentation is no longer maintained and may be removed. For the latest
  information, see the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html">current
  Elasticsearch documentation</a>.
</p>
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch: The Definitive Guide [2.x]</a></span>
»
<span class="breadcrumb-link"><a href="administration.html">Administration, Monitoring, and Deployment</a></span>
»
<span class="breadcrumb-link"><a href="post_deploy.html">Post-Deployment</a></span>
»
<span class="breadcrumb-node">Backing Up Your Cluster</span>
</div>
<div class="navheader">
<span class="prev">
<a href="_rolling_restarts.html">« Rolling Restarts</a>
</span>
<span class="next">
<a href="_restoring_from_a_snapshot.html">Restoring from a Snapshot »</a>
</span>
</div>
<div class="section">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="backing-up-your-cluster"></a>Backing Up Your Cluster<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch-definitive-guide/edit/2.x/520_Post_Deployment/50_backup.asciidoc">edit</a>
</h2>
</div></div></div>
<p>As with any software that stores data, it is important to routinely back up your
data.  Elasticsearch replicas provide high availability during runtime; they allow
you to tolerate sporadic node loss without an interruption of service.</p>
<p>Replicas do not provide protection from catastrophic failure, however.  For that,
you need a real backup of your cluster—​a complete copy in case something goes
wrong.</p>
<p>To back up your cluster, you can use the <code class="literal">snapshot</code> API.  This will take the current
state and data in your cluster and save it to a shared repository.  This
backup process is "smart."  Your first snapshot will be a complete copy of data,
but all subsequent snapshots will save the <em>delta</em> between the existing
snapshots and the new data.  Data is incrementally added and deleted as you snapshot
data over time.  This means subsequent backups will be substantially
faster since they are transmitting far less data.</p>
<p>To use this functionality, you must first create a repository to save data.
There are several repository types that you may choose from:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
Shared filesystem, such as a NAS
</li>
<li class="listitem">
Amazon S3
</li>
<li class="listitem">
HDFS (Hadoop Distributed File System)
</li>
<li class="listitem">
Azure Cloud
</li>
</ul>
</div>
<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_creating_the_repository"></a>Creating the Repository<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch-definitive-guide/edit/2.x/520_Post_Deployment/50_backup.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Let’s set up a shared filesystem repository:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">PUT _snapshot/my_backup <a id="CO310-1"></a><i class="conum" data-value="1"></i>
{
    "type": "fs", <a id="CO310-2"></a><i class="conum" data-value="2"></i>
    "settings": {
        "location": "/mount/backups/my_backup" <a id="CO310-3"></a><i class="conum" data-value="3"></i>
    }
}</pre>
</div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO310-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>We provide a name for our repository, in this case it is called <code class="literal">my_backup</code>.</p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO310-2"><i class="conum" data-value="2"></i></a></p>
</td>
<td align="left" valign="top">
<p>We specify that the type of the repository should be a shared filesystem.</p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO310-3"><i class="conum" data-value="3"></i></a></p>
</td>
<td align="left" valign="top">
<p>And finally, we provide a mounted drive as the destination.</p>
</td>
</tr>
</table>
</div>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>The shared filesystem path must be accessible from all nodes in your
cluster!</p>
</div>
</div>
<p>This will create the repository and required metadata at the mount point.  There
are also some other options that you may want to configure, depending on the
performance profile of your nodes, network, and repository location:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">max_snapshot_bytes_per_sec</code>
</span>
</dt>
<dd>
    When snapshotting data into the repo, this controls
the throttling of that process.  The default is <code class="literal">20mb</code> per second.
</dd>
<dt>
<span class="term">
<code class="literal">max_restore_bytes_per_sec</code>
</span>
</dt>
<dd>
When restoring data from the repo, this controls
how much the restore is throttled so that your network is not saturated.  The
default is <code class="literal">20mb</code> per second.
</dd>
</dl>
</div>
<p>Let’s assume we have a very fast network and are OK with extra traffic, so we
can increase the defaults:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">POST _snapshot/my_backup/ <a id="CO311-1"></a><i class="conum" data-value="1"></i>
{
    "type": "fs",
    "settings": {
        "location": "/mount/backups/my_backup",
        "max_snapshot_bytes_per_sec" : "50mb", <a id="CO311-2"></a><i class="conum" data-value="2"></i>
        "max_restore_bytes_per_sec" : "50mb"
    }
}</pre>
</div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO311-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>Note that we are using a <code class="literal">POST</code> instead of <code class="literal">PUT</code>.  This will update the settings
of the existing repository.</p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO311-2"><i class="conum" data-value="2"></i></a></p>
</td>
<td align="left" valign="top">
<p>Then add our new settings.</p>
</td>
</tr>
</table>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_snapshotting_all_open_indices"></a>Snapshotting All Open Indices<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch-definitive-guide/edit/2.x/520_Post_Deployment/50_backup.asciidoc">edit</a>
</h3>
</div></div></div>
<p>A repository can contain multiple snapshots.  Each snapshot is associated with a
certain set of indices (for example, all indices, some subset, or a single index).  When
creating a snapshot, you specify which indices you are interested in and
give the snapshot a unique name.</p>
<p>Let’s start with the most basic snapshot command:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">PUT _snapshot/my_backup/snapshot_1</pre>
</div>
<p>This will back up all open indices into a snapshot named <code class="literal">snapshot_1</code>, under the
<code class="literal">my_backup</code> repository.  This call will return immediately, and the snapshot will
proceed in the background.</p>
<div class="tip admon">
<div class="icon"></div>
<div class="admon_content">
<p>Usually you’ll want your snapshots to proceed as a background process, but occasionally
you may want to wait for completion in your script.  This can be accomplished by
adding a <code class="literal">wait_for_completion</code> flag:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">PUT _snapshot/my_backup/snapshot_1?wait_for_completion=true</pre>
</div>
<p>This will block the call until the snapshot has completed.  Note that large snapshots
may take a long time to return!</p>
</div>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_snapshotting_particular_indices"></a>Snapshotting Particular Indices<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch-definitive-guide/edit/2.x/520_Post_Deployment/50_backup.asciidoc">edit</a>
</h3>
</div></div></div>
<p>The default behavior is to back up all open indices.  But say you are using Marvel,
and don’t really want to back up all the diagnostic <code class="literal">.marvel</code> indices.  You
just don’t have enough space to back up everything.</p>
<p>In that case, you can specify which indices to back up when snapshotting your cluster:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">PUT _snapshot/my_backup/snapshot_2
{
    "indices": "index_1,index_2"
}</pre>
</div>
<p>This snapshot command will now back up only <code class="literal">index1</code> and <code class="literal">index2</code>.</p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_listing_information_about_snapshots"></a>Listing Information About Snapshots<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch-definitive-guide/edit/2.x/520_Post_Deployment/50_backup.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Once you start accumulating snapshots in your repository, you may forget the details
relating to each—​particularly when the snapshots are named based on time
demarcations (for example, <code class="literal">backup_2014_10_28</code>).</p>
<p>To obtain information about a single snapshot, simply issue a <code class="literal">GET</code> request against
the repo and snapshot name:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">GET _snapshot/my_backup/snapshot_2</pre>
</div>
<p>This will return a small response with various pieces of information regarding
the snapshot:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">{
   "snapshots": [
      {
         "snapshot": "snapshot_1",
         "indices": [
            ".marvel_2014_28_10",
            "index1",
            "index2"
         ],
         "state": "SUCCESS",
         "start_time": "2014-09-02T13:01:43.115Z",
         "start_time_in_millis": 1409662903115,
         "end_time": "2014-09-02T13:01:43.439Z",
         "end_time_in_millis": 1409662903439,
         "duration_in_millis": 324,
         "failures": [],
         "shards": {
            "total": 10,
            "failed": 0,
            "successful": 10
         }
      }
   ]
}</pre>
</div>
<p>For a complete listing of all snapshots in a repository, use the <code class="literal">_all</code> placeholder
instead of a snapshot name:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">GET _snapshot/my_backup/_all</pre>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_deleting_snapshots"></a>Deleting Snapshots<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch-definitive-guide/edit/2.x/520_Post_Deployment/50_backup.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Finally, we need a command to delete old snapshots that are no longer useful.
This is simply a <code class="literal">DELETE</code> HTTP call to the repo/snapshot name:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">DELETE _snapshot/my_backup/snapshot_2</pre>
</div>
<p>It is important to use the API to delete snapshots, and not some other mechanism
(such as deleting by hand, or using automated cleanup tools on S3).  Because snapshots are
incremental, it is possible that many snapshots are relying on old segments.
The <code class="literal">delete</code> API understands what data is still in use by more recent snapshots,
and will delete only unused segments.</p>
<p>If you do a manual file delete, however, you are at risk of seriously corrupting
your backups because you are deleting data that is still in use.</p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_monitoring_snapshot_progress"></a>Monitoring Snapshot Progress<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch-definitive-guide/edit/2.x/520_Post_Deployment/50_backup.asciidoc">edit</a>
</h3>
</div></div></div>
<p>The <code class="literal">wait_for_completion</code> flag provides a rudimentary form of monitoring, but
really isn’t sufficient when snapshotting or restoring even moderately sized clusters.</p>
<p>Two other APIs will give you more-detailed status about the
state of the snapshotting.  First you can execute a <code class="literal">GET</code> to the snapshot ID,
just as we did earlier get information about a particular snapshot:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">GET _snapshot/my_backup/snapshot_3</pre>
</div>
<p>If the snapshot is still in progress when you call this, you’ll see information
about when it was started, how long it has been running, and so forth.  Note, however,
that this API uses the same threadpool as the snapshot mechanism.  If you are
snapshotting very large shards, the time between status updates can be quite large,
since the API is competing for the same threadpool resources.</p>
<p>A better option is to poll the <code class="literal">_status</code> API:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">GET _snapshot/my_backup/snapshot_3/_status</pre>
</div>
<p>The <code class="literal">_status</code> API returns immediately and gives a much more verbose output of
statistics:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">{
   "snapshots": [
      {
         "snapshot": "snapshot_3",
         "repository": "my_backup",
         "state": "IN_PROGRESS", <a id="CO312-1"></a><i class="conum" data-value="1"></i>
         "shards_stats": {
            "initializing": 0,
            "started": 1, <a id="CO312-2"></a><i class="conum" data-value="2"></i>
            "finalizing": 0,
            "done": 4,
            "failed": 0,
            "total": 5
         },
         "stats": {
            "number_of_files": 5,
            "processed_files": 5,
            "total_size_in_bytes": 1792,
            "processed_size_in_bytes": 1792,
            "start_time_in_millis": 1409663054859,
            "time_in_millis": 64
         },
         "indices": {
            "index_3": {
               "shards_stats": {
                  "initializing": 0,
                  "started": 0,
                  "finalizing": 0,
                  "done": 5,
                  "failed": 0,
                  "total": 5
               },
               "stats": {
                  "number_of_files": 5,
                  "processed_files": 5,
                  "total_size_in_bytes": 1792,
                  "processed_size_in_bytes": 1792,
                  "start_time_in_millis": 1409663054859,
                  "time_in_millis": 64
               },
               "shards": {
                  "0": {
                     "stage": "DONE",
                     "stats": {
                        "number_of_files": 1,
                        "processed_files": 1,
                        "total_size_in_bytes": 514,
                        "processed_size_in_bytes": 514,
                        "start_time_in_millis": 1409663054862,
                        "time_in_millis": 22
                     }
                  },
                  ...</pre>
</div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO312-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>A snapshot that is currently running will show <code class="literal">IN_PROGRESS</code> as its status.</p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO312-2"><i class="conum" data-value="2"></i></a></p>
</td>
<td align="left" valign="top">
<p>This particular snapshot has one shard still transferring (the other four have already completed).</p>
</td>
</tr>
</table>
</div>
<p>The response includes the overall status of the snapshot, but also drills down into
per-index and per-shard statistics.  This gives you an incredibly detailed view
of how the snapshot is progressing.  Shards can be in various states of completion:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">INITIALIZING</code>
</span>
</dt>
<dd>
    The shard is checking with the cluster state to see whether it can
be snapshotted.  This is usually very fast.
</dd>
<dt>
<span class="term">
<code class="literal">STARTED</code>
</span>
</dt>
<dd>
Data is being transferred to the repository.
</dd>
<dt>
<span class="term">
<code class="literal">FINALIZING</code>
</span>
</dt>
<dd>
Data transfer is complete; the shard is now sending snapshot metadata.
</dd>
<dt>
<span class="term">
<code class="literal">DONE</code>
</span>
</dt>
<dd>
Snapshot complete!
</dd>
<dt>
<span class="term">
<code class="literal">FAILED</code>
</span>
</dt>
<dd>
    An error was encountered during the snapshot process, and this shard/index/snapshot
could not be completed.  Check your logs for more information.
</dd>
</dl>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="_canceling_a_snapshot"></a>Canceling a Snapshot<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch-definitive-guide/edit/2.x/520_Post_Deployment/50_backup.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Finally, you may want to cancel a snapshot or restore.  Since these are long-running
processes, a typo or mistake when executing the operation could take a long time to
resolve—​and use up valuable resources at the same time.</p>
<p>To cancel a snapshot, simply delete the snapshot while it is in progress:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">DELETE _snapshot/my_backup/snapshot_3</pre>
</div>
<p>This will halt the snapshot process. Then proceed to delete the half-completed
snapshot from the repository.</p>
</div>

</div>
<div class="navfooter">
<span class="prev">
<a href="_rolling_restarts.html">« Rolling Restarts</a>
</span>
<span class="next">
<a href="_restoring_from_a_snapshot.html">Restoring from a Snapshot »</a>
</span>
</div>
</div>

                  <!-- end body -->
                </div>
                <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                  <div id="rtpcontainer" style="display: block;">
                    <div class="mktg-promo">
                      <h3>Most Popular</h3>
                      <ul class="icons">
                        <li class="icon-elasticsearch-white"><a href="https://www.elastic.co/webinars/getting-started-elasticsearch?baymax=default&amp;elektra=docs&amp;storm=top-video">Get Started with Elasticsearch: Video</a></li>
                        <li class="icon-kibana-white"><a href="https://www.elastic.co/webinars/getting-started-kibana?baymax=default&amp;elektra=docs&amp;storm=top-video">Intro to Kibana: Video</a></li>
                        <li class="icon-logstash-white"><a href="https://www.elastic.co/webinars/introduction-elk-stack?baymax=default&amp;elektra=docs&amp;storm=top-video">ELK for Logs &amp; Metrics: Video</a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </section>

        </div>


<div id="elastic-footer"></div>
<script src="https://www.elastic.co/elastic-footer.js"></script>
<!-- Footer Section end-->

      </section>
    </div>

<script src="/guide/static/jquery.js"></script>
<script type="text/javascript" src="/guide/static/docs.js"></script>
<script type="text/javascript">
  window.initial_state = {}</script>
  </body>
</html>
